//
//  SingoViewCell.m
//  TestDemo
//
//  Created by zzz on 15/9/9.
//  Copyright © 2015年 zzz. All rights reserved.
//

#import "SingoViewCell.h"

@implementation SingoViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        // 创建一个UIImageView控件
        UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"zilong.jpg"]];
        imageView.frame = CGRectMake(0, 0, 185, 240);
        [self.contentView addSubview:imageView];
        
        // 创建一个UILabel控件
        self.label = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 0.0,frame.size.width, frame.size.height)];
        self.label.textAlignment = NSTextAlignmentCenter;
        self.label.font = [UIFont boldSystemFontOfSize:50.0];
        // 设置该控件文本颜色
        self.label.textColor = [UIColor grayColor];
        // 将UILabel控件添加到该单元格中
        [self.contentView addSubview:self.label];
        
        // 设置边框
        self.contentView.layer.borderWidth = 2.0f;
        self.contentView.layer.borderColor = [UIColor whiteColor].CGColor;
        
        // 设置该控件的自动缩放属性
        self.label.autoresizingMask = UIViewAutoresizingFlexibleHeight|
        UIViewAutoresizingFlexibleWidth;

    }
    return self;
}

@end
